home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / bt110.exe / JULIAN.BAS < prev    next >
BASIC Source File  |  1992-10-06  |  1KB  |  24 lines

  1. 10 'julian.bas                                                 
  2. 20 DIM DAYS(12)                                                
  3. 30 DATA 31,28,31, 30,31,30, 31,31,30, 31,30,31                 
  4. 40 FOR I = 1 TO 12 : READ DAYS(I) : NEXT                       
  5. 50 INPUT "Start month";M                                       
  6. 60 INPUT "Start day";D                                         
  7. 70 GOSUB 200                                                   
  8. 80 E1 = ELAPSED                                                
  9. 90 INPUT "End month";M                                         
  10. 100 INPUT "End day";D                                          
  11. 110 GOSUB 200                                                  
  12. 120 DATE.DIF = ELAPSED - E1                                    
  13. 130 PRINT                                                      
  14. 140 PRINT "difference =";DATE.DIF                              
  15. 150 END                                                        
  16. 200 '===================== calc elapsed time in days           
  17. 210 ELAPSED = D                                                
  18. 220 FOR I = 1 TO M - 1                                         
  19. 230 ELAPSED = ELAPSED + DAYS(I)                                
  20. 240 NEXT                                                       
  21. 250 PRINT ELAPSED;"days elapsed. ";365-ELAPSED; "days to go"   
  22. 260 RETURN                                                     
  23.  
  24.